<template>
    <div>
         <el-button type="primary" @click="add()">添加</el-button>
        <v-list @bianji=bianji></v-list>
        <v-add :obj='obj' ref="aa"></v-add>
    </div>
</template>

<script>
import vList from './components/list.vue'
import vAdd from './components/add.vue'
export default {
    data() {
        return {
            obj:{
                istrue:false,
                isadd:false
            }
        }
    },
    components:{
        vAdd,
        vList
    },
    methods:{
      add(){
          this.obj.istrue=true
          this.obj.isadd=true
        },
        bianji(id){
            this.obj.istrue=true
          this.obj.isadd=false
        //   console.log(id);
        //   console.log(this.$refs.aa);
          this.$refs.aa.getinfo(id)
        }
  }
}
</script>

<style lang="less">
    
</style>